package com.mdd.usercenter.model.enums;

/**
 * 队伍状态枚举
 */
public enum TeamStatusEnum {

    PUBLIC(0,"公开"),
    PRIVATE(1,"私密"),
    SECRET(2,"加密");

    /**
     * 状态码
     */
    private int teamStatusCode;
    /**
     * 描述
     */
    private String text;

    TeamStatusEnum(int teamStatusCode, String text) {
        this.teamStatusCode = teamStatusCode;
        this.text = text;
    }

    public static TeamStatusEnum getTeamStatusByValues(Integer integer){
        if (integer == null) {
            return null;
        }
        TeamStatusEnum[] values = TeamStatusEnum.values();
        for (TeamStatusEnum value : values) {
            if (value.teamStatusCode == integer) {
                return value;
            }
        }
        return null;
    }


    public int getTeamStatusCode() {
        return teamStatusCode;
    }

    public String getText() {
        return text;
    }
}